<template>
  <div class="header">
    <div class="nav_topbar">
      <div class="container">
        <div class="top_left">
        <a href="javascript:;">小米商城</a>
        <a href="javascript:;">MUI</a>
        <a href="javascript:;">云服务</a>
        <a href="javascript:;">协议规则</a>
      </div>
      <div class="top_right">
        <a href="javascript:;">登录</a>
        <a href="javascript:;">注册</a>
        <a href="javascript:;" class="my_cart">
          <span class="bgimg"></span>
          购物车</a>
      </div>
      </div>
    </div>
    <div class="nav_header">
      <div class="container">
        <div class="header_logo">
          <a href="javascript:;"></a>
        </div>
        <div class="header_menu">
          <div class="item_menu">
            <span>小米手机</span>
            <div class="children">
              <ul>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
              </ul>
            </div>
          </div>
          <div class="item_menu">
            <span>RedMi手机</span>
          </div>
          <div class="item_menu">
            <span>电视</span>
            <div class="children">
              <ul>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
                <li class="product">
                  <a href="javascript:;">
                    <div class="product-img"><img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/f515ab05232ed14ccd78ec67e024495a.png" alt=""></div>
                    <div class="product-name">小米CC9</div>
                    <div class="product-price">2999元</div>
                  </a>
                </li>
              </ul>
            </div>
          </div>
        </div>
        <div class="header_search">
          <input type="text" name="keyword" placeholder="请买" id="search">
          <a href="javascript:;"></a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {

}
</script>

<style lang='scss' scope>
  @import '~@/assets/scss/base.scss';
  @import '~@/assets/scss/mixin.scss';
  @import '~@/assets/scss/config.scss';
  .header{
    .nav_topbar{
      width: 100%;
      background-color: #333333;
      height: 39px;
      line-height: 39px;
      a{
        color: #B0B0B0;
        display: inline-block;
        margin-right: 18px;
      }
      .container{
        @include flex();
        .my_cart{
          margin-right: 0;
          width: 110px;
          text-align: center;
          background-color: #ff6600;
          color: #ffffff;
          .bgimg{
            @include bgImg(16px,12px,'../../public/imgs/icon-cart-checked.png');
            margin-right: 4px;
          }
        }
      }
    }
    .nav_header{
      height: 112px;
      .container{
        height: 112px;
        position: relative;
        @include flex('');
        .header_logo{
          display: inline-block;
          width: 55px;
          height: 55px;
          background-color: #ff6600;
          a{
            width: 110px;
            height: 55px;
            display: inline-block;
            overflow: hidden;
            &:before{
              content: ' ';
              transition: margin .3s;
              @include bgImg(55px,55px,'../../public/imgs/mi-logo.png',contain);
            }
            &:after{
              content: ' ';
              @include bgImg(55px,55px,'../../public/imgs/mi-home.png',contain);
            }
            &:hover:before{
              margin-left: -55px;
              transition: margin .3s;
            }
          }
        }
        .header_menu{
          // width: 300px;
          padding-left: 209px;
          width: 643px;
          display: inline-block;
          .item_menu{
            margin-right: 20px;
            display: inline-block;
            font-size: 16px;
            font-weight: bold;
            line-height: 112px;
            span{
              cursor: pointer;
            }
            &:hover{
              .children{
                height: 220px;
                opacity: 1;
              }
            }
            .children{
              background: #fff;
              transition: .3s;
              position: absolute;
              height: 220px;
              top: 112px;
              left: 0;
              width: 1228px;
              border-top:1px solid #E5E5E5;
              box-shadow:0px 7px 6px 0px rgba(0, 0, 0, 0.11);
              height: 0;
              overflow: hidden;
              opacity: 0;
              ul{
                height: 100%;
                li.product{
                  float: left;
                  width: 16.666%;
                  text-align: center;
                  height: 100%;
                  font-size: 12px;
                  line-height: 12px;
                  a{
                    display: inline-block;
                    img{
                      height: 111px;
                      width: auto;
                      margin-top:20px ;
                    }
                    .product-name{
                      color: $colorB;
                      margin-top: 16px;
                      margin-bottom: 15px;
                    }
                    .product-price{
                      color:$colorA
                    }
                  }
                }
              }
              
            }
            &:hover{
              color: #ff6600;
            }
          }
        }
        .header_search{
          justify-self: self-end;
          width: 319px;
          outline: 1px solid #E0E0E0;
          display: flex;
          justify-content: center;
          align-items: center;
          input{
            border: none;
            box-sizing: border-box;
            border-right: 1px solid #E0E0E0;
            width:264px;
            height: 50px;
            padding-left: 14px;
            &::placeholder{
              color: #B0B0B0;;
            }
          }
          a{
            flex: 1;
            @include bgImg(18px,18px,'../../public/imgs/icon-search.png');
          }
        }
      }
    }
  }
</style>